package com.vincent.template.domain;

import com.vincent.template.commons.base.BaseIncrEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * 角色
 * @Author Vincent Wang
 * @Date 2020/10/21 11:26
 */
@Entity
@Table(name = "sys_role",
        uniqueConstraints = {@UniqueConstraint(name = "code_unique", columnNames = {"code"})})
public class SysRolePo extends BaseIncrEntity {

    /**
     * 角色Code
     */
    @Column(nullable = false, length = 64)
    private String code;

    /**
     * 角色描述
     */
    @Column(length = 128)
    private String remark;

    /**
     * 绑定的用户是否能被移除
     */
    @Column(columnDefinition = "tinyint(1) default 1")
    private boolean userRemovable;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public boolean isUserRemovable() {
        return userRemovable;
    }

    public void setUserRemovable(boolean userRemovable) {
        this.userRemovable = userRemovable;
    }
}

